﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Web;

namespace IceDog.DNF.Program.Website
{
    public class IconHelper
    {
        public static string GetFace1Base64()
        {
            Bitmap face1 = Resources.Icon.face1;
            var stream = new MemoryStream();
            face1.Save(stream, ImageFormat.Png);
            stream.Seek(0, SeekOrigin.Begin);
            var byteArr = new byte[stream.Length];
            stream.Read(byteArr, 0, byteArr.Length);
            var str = Convert.ToBase64String(byteArr);
            var prefix = "data:image/png;base64,";
            return prefix + str;
        }
    }
}